import java.util.ArrayList;
import java.util.Iterator;


public class ListDemo {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		ArrayList al=new ArrayList();
		al.add("sanjay");
		al.add("ram");
		
	//System.out.println(al); 

		
		/*for(Object e:al){
	System.out.println(e);	
}
	*/
		
	
		Iterator it =al.iterator();
		while(it.hasNext()){
			System.out.println(it.next());
		}
			
			}
}
// for each loop se list me nprint one by one
